package com.kjsb.service.impl;

import com.kjsb.dao.UnitDao;
import com.kjsb.entity.Unit;
import com.kjsb.service.UnitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UnitServiceImpl implements UnitService {
    @Autowired
    private UnitDao unitDao;


    public boolean updateUnits(Unit unit) {
        unitDao.updateUnits(unit);
        return true;
    }


    public boolean deleteUnits(Integer unitid) {
    unitDao.deleteUnits(unitid);
        return true;
    }

    public Unit getByUId(Integer uid) {
        return unitDao.getByUId(uid);
    }


    public List<Unit> getAllUnits() {
        return unitDao.getAllUnits();
    }
}
